package com.learning.platform.dto;

import com.learning.platform.entity.QuestionBank;
import com.learning.platform.enums.Difficulty;
import com.learning.platform.enums.QuestionType;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public class QuestionBankResponse {
    private Long id;
    private Long courseId;
    private String title;
    private String content;
    private QuestionType questionType;
    private String options;
    private String correctAnswers;
    private String explanation;
    private Difficulty difficulty;
    private BigDecimal points;
    private Long createdBy;
    private String creatorName; // 创建者姓名
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    // Constructors
    public QuestionBankResponse() {}
    
    public QuestionBankResponse(QuestionBank questionBank) {
        this.id = questionBank.getId();
        this.courseId = questionBank.getCourseId();
        this.title = questionBank.getTitle();
        this.content = questionBank.getContent();
        this.questionType = questionBank.getQuestionType();
        this.options = questionBank.getOptions();
        this.correctAnswers = questionBank.getCorrectAnswers();
        this.explanation = questionBank.getExplanation();
        this.difficulty = questionBank.getDifficulty();
        this.points = questionBank.getPoints();
        this.createdBy = questionBank.getCreatedBy();
        this.createdAt = questionBank.getCreatedAt();
        this.updatedAt = questionBank.getUpdatedAt();
    }
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getCourseId() {
        return courseId;
    }
    
    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    
    public QuestionType getQuestionType() {
        return questionType;
    }
    
    public void setQuestionType(QuestionType questionType) {
        this.questionType = questionType;
    }
    
    public String getOptions() {
        return options;
    }
    
    public void setOptions(String options) {
        this.options = options;
    }
    
    public String getCorrectAnswers() {
        return correctAnswers;
    }
    
    public void setCorrectAnswers(String correctAnswers) {
        this.correctAnswers = correctAnswers;
    }
    
    public String getExplanation() {
        return explanation;
    }
    
    public void setExplanation(String explanation) {
        this.explanation = explanation;
    }
    
    public Difficulty getDifficulty() {
        return difficulty;
    }
    
    public void setDifficulty(Difficulty difficulty) {
        this.difficulty = difficulty;
    }
    
    public BigDecimal getPoints() {
        return points;
    }
    
    public void setPoints(BigDecimal points) {
        this.points = points;
    }
    
    public Long getCreatedBy() {
        return createdBy;
    }
    
    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }
    
    public String getCreatorName() {
        return creatorName;
    }
    
    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
}